package org.example.lethear.dto.whisper;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 悄悄话DTO
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class WhisperDTO {
    
    private Long id;
    private String content;
    private String imageUrl;
    private String senderName; // 发送者显示名称（可能是匿名）
    private String recipientType; // 接收者类型：username, code
    private String recipientValue; // 接收者值
    private Boolean isAnonymous;
    private Boolean isRead;
    private LocalDateTime createdAt;
    
    /**
     * 发送者信息（只有在非匿名情况下才显示）
     */
    private SenderInfo sender;
    
    /**
     * 接收者信息（只显示基本信息）
     */
    private RecipientInfo recipient;
    
    /**
     * 发送者信息内部类
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class SenderInfo {
        private Long id;
        private String username;
        private String nickname;
        private String avatar;
    }
    
    /**
     * 接收者信息内部类
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class RecipientInfo {
        private Long id;
        private String username;
        private String nickname;
        private String avatar;
    }
} 